package com.aspose.cells;

class zmp extends zado {
   public zmp(zadj var1) {
      this.a = var1;
   }

   public int a(String[] var1) throws Exception {
      if (var1[0].length() < 2) {
         var1[0] = "";
         return 1;
      } else {
         switch(var1[0].charAt(1)) {
         case ' ':
            this.a.g = this.a.a;
            break;
         case '&':
            this.a.h = this.a.h + "&";
            this.a.g = this.a.a;
            break;
         case '=':
            this.a.g = this.a.a;
            break;
         case 'A':
            this.a.h = this.a.h + this.a.j.getName();
            this.a.g = this.a.a;
            break;
         case 'D':
            DateTime var5 = DateTime.getNow();
            this.a.h = this.a.h + this.a.j.getWorkbook().getSettings().e().a(14, var5).h();
            this.a.g = this.a.a;
            break;
         case 'F':
            try {
               this.a.h = this.a.h + com.aspose.cells.b.a.d.zk.b(this.a.j.getWorkbook().getFileName());
            } catch (Exception var8) {
               ;
            }

            this.a.g = this.a.a;
            break;
         case 'G':
            this.a.g = this.a.d;
            return 1;
         case 'N':
            this.a.h = this.a.h + com.aspose.cells.b.a.zo.a(this.a.l);
            this.a.g = this.a.a;
            break;
         case 'P':
            int var2 = 0;
            int var3 = this.a.k;
            int var4 = 2;
            if (var1[0].length() > 3 && (var1[0].charAt(var4) == '+' && var1[0].charAt(var4 + 1) == '+' || var1[0].charAt(var4) == '-' && var1[0].charAt(var4 + 1) == '-')) {
               this.a.h = this.a.h + (var3 + var2);
               this.a.h = this.a.h + var1[0].charAt(var4);
               this.a.g = this.a.a;
               var1[0] = var1[0].substring(var4 + 2);
               return 1;
            }

            if (var1[0].length() > 2 && (var1[0].charAt(var4) == '+' || var1[0].charAt(var4) == '-')) {
               ++var4;
               if (var1[0].length() > 3) {
                  while(var4 < var1[0].length() && Character.isDigit(var1[0].charAt(var4))) {
                     ++var4;
                  }

                  if (var4 > 3) {
                     var2 = com.aspose.cells.b.a.zo.a(var1[0].substring(2, 2 + (var4 - 2)), 7);
                  }
               }
            }

            this.a.h = this.a.h + (var3 + var2);
            this.a.g = this.a.a;
            var1[0] = var1[0].substring(var4);
            return 1;
         case 'T':
            DateTime var6 = DateTime.getNow();
            this.a.h = this.a.h + var6.a();
            this.a.g = this.a.a;
            break;
         case 'Z':
            try {
               this.a.h = this.a.h + com.aspose.cells.b.a.d.zk.e(this.a.j.getWorkbook().getFileName());
            } catch (Exception var9) {
               ;
            }

            this.a.g = this.a.a;
            break;
         default:
            this.a.g = this.a.e;
            return 1;
         }

         var1[0] = var1[0].substring(2);
         return 1;
      }
   }
}
